//package com.xiaoyu.izf.config;
//
//import org.springframework.stereotype.Component;
//import org.springframework.web.servlet.HandlerInterceptor;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import javax.servlet.http.HttpSession;
//
//@Component
//public class UserSecurityInterceptor implements HandlerInterceptor {
//    @Override
//    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
//            throws Exception {
//        HttpSession session = request.getSession();
//        if (session.getAttribute(SysConfig.user_info_in_session_key) != null) {
//            request.setAttribute("user", session.getAttribute(SysConfig.user_info_in_session_key));
//            return true;
//        }
//        //return true;
//        // 跳转登录
//        String url = "/mgr/login_page";
//        response.sendRedirect(url);
//        return false;
//    }
//}
